//导入vue-router包
import VueRouter from 'vue-router'

//导入相关的组件
import home from './components/tabbar/HomeContainer.vue'
import member from './components/tabbar/MerberContainer.vue'
import search from './components/tabbar/SearchContainer.vue'
import shopcart from './components/tabbar/ShopcarContainer.vue'




// 3.创建路由对象
var router = new VueRouter({
	routes:[ //配置路由规则
		{path:'/',redirect:'/home'},//重定向
		{path:'/home',component:home},
		{path:'/member',component:member},
		{path:'/shopcart',component:search},
		{path:'/search',component:shopcart}
	],
	linkActiveClass:'mui-active' //覆盖默认的路由高亮的类，默认router-link-acitve
})

// 把路由对象暴露出去,因为我们的vm实例中需要用到router，所有需要暴露出去
export default router;
